<?php require VIEW_PATH."/header.php";?>
<body>
	<form method="post">
    <input type="hidden" name="cat_id" value="<?php echo $field['cat_id']?>">
        <table class="hd-table hd-table-form hd-form">
            <thead>
                <tr>
                    <td colspan="2">修改栏目</td>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <th>父级</th>
                    <td>
                     <select name="pid">
                         <option value="0">===顶级栏目===</option>
                         <?php foreach ($cat as $v){?>
                         <option value="<?php echo $v['cat_id']?>"
                        <?php if($field['pid']==$v['cat_id']){?>
                
                        selected
                        
               <?php }?>

                        <?php if($field['cat_id']==$v['cat_id']){?>
                
                        disabled
                        
               <?php }?>

                        <?php if(Data::isChild($cat,$v['cat_id'],$field['cat_id'],'cat_id')){?>
                
                        disabled
                        
               <?php }?>
                         >
                            <?php echo $v['_cat_name']?>
                        </option>
                        <?php }?>
                    </select>
                </td>
            </tr>
            <tr>
                <th>栏目名称</th>
                <td>
                    <input type="text" name="cat_name" value="<?php echo $field['cat_name']?>" class="hd-w300">
                </td>
            </tr>
            <tr>
                <th>搜索类型</th>
                <td>
                <select name="type_id" id="">
                <option value="0">选择</option>
                <?php foreach ($goodsType as $v){?>
                <?php if($field['type_id']==$v['id']){?>
                
                <option value="<?php echo $v['id']?>" selected=""><?php echo $v['type_name']?></option>
                <?php }else{?>
                <option value="<?php echo $v['id']?>"><?php echo $v['type_name']?></option>
                
               <?php }?>
                <?php }?>
                </select>
                </td>
            </tr>
            <tr>
                <th>栏目关键词</th>
                <td>
                    <input type="text" name="keyword" value="<?php echo $field['keyword']?>" class="hd-w300">
                </td>
            </tr>
            <tr>
                <th>栏目描述</th>
                <td>
                    <textarea name="dest" class="hd-w300 hd-h100"><?php echo $field['dest']?></textarea>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <button class="hd-btn hd-btn-primary">提交</button>
                </td>
            </tr>
        </tbody>
    </table>
</form>
</body>
</html>